<?
  set_include_path('./'.PATH_SEPARATOR.dirname(__FILE__)."/../");
  include_once "mode/message/mtmmessage.php";
  try{
  $rows=tbhelper::produce("message");
  $db = new db("mysql:host=localhost;dbname=test1","root","kaixin9999");
  /*
  $rows->col["msid"]->colValue=null;
  $rows->col["msfrom"]->colValue=1;
  $rows->col["msto"]->colValue=2;
  */
  $rows->col["mscontent"]->colValue="hello worlds dsad!";
  $rows->col["mstype"]->colValue=mtmMessage::GTG;
  //echo get_class($rows);
  //print_r($rows);
   $message=new mtmMessage(&$db,$rows,2);
   $message->update();
   print_r($message->getInfo("mstype=".mtmMessage::MTM,0,10));
   
  }catch(Error $er){
	$er->recode();
  }catch(Exception $er){
	echo $er->getMessage();
}
?>
